<?php
require_once dirname(__FILE__) . '/common/common.inc.php';
require_once dirname(__FILE__) . "/database/$database/database.inc.php";

header('Content-Type: text/plain');

global $myManager;

$orm1 = classToOrm('pz_task');
$orm2 = classToOrm('pz_task_track');
$orm3 = classToOrm('pz_task_note');
$orm4 = classToOrm('pz_task_event');
$orm5 = classToOrm('pz_model');
$orm6 = classToOrm('pz_model_transition');
$orm7 = classToOrm('pz_model_state');
$orm8 = classToOrm('pz_user');
$orm9 = classToOrm('pz_courier');
$orm10 = classToOrm('pz_culture');
$orm11 = classToOrm('pz_ceremony');
$orm12 = classToOrm('pz_reception');
$orm13 = classToOrm('pz_color');
  try {
    $myManager->start_t();
    $result1 = $orm1->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
    $result2 = $orm2->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
    $result3 = $orm3->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
    $result4 = $orm4->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
    $result5 = $orm5->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
    $result6 = $orm6->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
    $result7 = $orm7->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
    $result8 = $orm8->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
    $result9 = $orm9->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
    $result10 = $orm10->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
    $result11 = $orm11->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
    $result12 = $orm12->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
    $result13 = $orm13->find($myManager, NULL, NULL, NULL, NULL, NULL, NULL);
    $myManager->commit_t();
    
    echo json_encode(array());
  } catch (PDOException $e) {
    echo $e->getMessage();
  }
?>